<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/sinopac-fn" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="/sinopac/form/CSS/tabs.css">
		<script type="text/javascript" src="/sinopac/js/jQuery/jquery-1.8.2.min.js"></script>
		<script type="text/javascript" src="/sinopac/js/jQuery/jquery_DOMWindow.js"></script>
		<script type="text/javascript" src="/sinopac/js/tools/formUtil.js"></script>
<script>
$(document).ready(function(){
	$('input[name=btnOK]').click(function(){
		var f = $('#upload');
		f.prop('action',"${fn:url('/BatchFile/uploadFile.action')}");
		f.submit();
	});

	$('input[name=btnCancel]').click(function(){
		var f = $('#upload');
		f.prop('action',"${fn:url('/BatchFile/backMain.action')}");
		f.submit();
	});
});
</script>
<title>批次申請</title>
</head>
<body>
<!--		if(<s:property value="insert_flag"/>){
			alert(<s:property value="insert_status"/>);
		}
		-->
<%@ include file="/form/include/title.jsp" %>
<div align="center">
<fieldset style="width: 400px">
<s:form id="upload" enctype="multipart/form-data" method="post">
	<s:property value="record_str"/>
	<s:label value="批次申請配發"/>
	<s:label value="讀入檔案"/><s:file name="file"/>
	<table>
		<tr>
			<td><input type="button" value="確定" name="btnOK"></td>
			<td><input type="button" value="取消" name="btnCancel"></td>
		</tr>
	</table>	
	<s:fielderror fieldName="error_msg" theme="simple"/>
</s:form>
</fieldset>
</div>
<div id="statusForm" style="display:none">
	<s:form action="">
		<table>
			<tr>
				<td><s:property value="insert_status"/></td>
			</tr>
			<tr height="10" />
			<tr>
				<td align="center"><button type="submit">確定</button></td>
			</tr>
		</table>
	</s:form>
</div>
</body>
</html>